package com.chazz.dao;

import com.chazz.entity.Adress;

import java.util.List;

import com.chazz.entity.User;

import java.sql.SQLException;

public interface UserDao {
    List<Adress> findAddressByUid(Integer userid);



    /**
     * 更改用户信息
     * @param user
     * @return rt受影响的行数
     */
    public int updateByUser(User user);

    /**用户注销
     * @param user
     */
    public int deletUser(User user);

    /**
     * 通过id找user
     * @param id
     * @return
     */
    public User findUserById(int id) throws SQLException;

    public boolean addUser(User user);
    public User findUserByEmail(String email) throws SQLException;
    /**
     * 查询user中最后一条数据的id
     */
    public int findUserFinalId() throws SQLException;
    public boolean updateUserPassword(User user) throws SQLException;
}
